package com.blockchainenergy.info.line;

import com.blockchainenergy.common.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @descriptions:
 * @data: 2021/10/23 12:31
 */

@RestController //本注解说明本类对象为spring容器管理的对象，并且说明这是一个控制器组件
@RequestMapping("/info/line")//本注解说明本控制器所有路径都以。。。开头
public class LineAPI {

    @Resource
    private LineService lineService;

    @GetMapping("/getLines")
    public Result getLines() throws Exception {
        return Result.success(lineService.getLines());
    }
    @GetMapping("/getLineInfoById")
    public Result getLineInfoById(@RequestParam Integer i, @RequestParam Integer j) throws Exception {;
        return Result.success(new LineInfo(i, j));
    }
}
